package cn.jdy.plugins.entity;

import cn.jdy.common.bo.BaseEntry;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * @author wuzhiliang
 * @title: 会员收藏商机信息记录实体类
 */
@Entity
public class Collect extends BaseEntry {

	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private CollectPK id;

	@ManyToOne
	@NotFound(action = NotFoundAction.IGNORE)
	@JoinColumn(name = "businessId", insertable = false, updatable = false)
	private Business business;
	
	public CollectPK getId() {
		return id;
	}

	public void setId(CollectPK id) {
		this.id = id;
	}

	public Business getBusiness() {
		return business;
	}

	public void setBusiness(Business business) {
		this.business = business;
	}

}
